package com.mapper;

import com.entity.Cart;
import com.entity.Collect;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface CartMapper {
    //删除购物车
    int deleteByPrimaryKey(Integer cId);

    //添加购物车
    int insert(Cart record);


    int insertSelective(Cart record);
    //查询购物车
    Cart selectByPrimaryKey(Integer cId);

    /**分页查看所有购物车内容*/
    List<Cart> queryAllCart(@Param("page") Integer page, @Param("count") Integer count, @Param("couserid") String couserid);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);


    Cart queryCartbyPid(@Param("pId") String pId);

    int deleteByCommodityid(String commodityid);

    void deleteByCommodityids(@Param("ids") Set<String> ids);
}